#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# project: spd-sxmcc
'''
@author: lyndon
@time created on 2018/9/11 13:13
@desc
'''
from com.teradata.basesytax.absbase.AbstractBaseIns import Talker


class herring:
    def talk(self):
        print("blub!")


Talker.register(herring)

h = herring()
h.talk()
print(isinstance(h, Talker))

'''
然而，这种做法存在一个缺点，就是直接从抽象类派生提供的保障没有了。
'''


class clam:
    pass


Talker.register(clam)

c = clam()

print(isinstance(c, Talker))

# c.talk()
